SimpleOpenNI
public class SimpleOpenNI extends ContextWrapper implements SimpleOpenNIConstants
GESTURE_CLICK, GESTURE_HAND_RAISE, GESTURE_WAVE, IMG_MODE_DEFAULT, IMG_MODE_RGB_FADE, NODE_DEPTH, NODE_GESTURE, NODE_HANDS, NODE_IMAGE, NODE_IR, NODE_NONE, NODE_PLAYER, NODE_RECORDER, NODE_SCENE, NODE_USER, RUN_MODE_DEFAULT, RUN_MODE_MULTI_THREADED, RUN_MODE_SINGLE_THREADED, SKEL_HEAD, SKEL_LEFT_ELBOW, SKEL_LEFT_FINGERTIP, SKEL_LEFT_FOOT, SKEL_LEFT_HAND, SKEL_LEFT_HIP, SKEL_LEFT_KNEE, SKEL_LEFT_SHOULDER, SKEL_NECK, SKEL_RIGHT_ELBOW, SKEL_RIGHT_FINGERTIP, SKEL_RIGHT_FOOT, SKEL_RIGHT_HAND, SKEL_RIGHT_HIP, SKEL_RIGHT_KNEE, SKEL_RIGHT_SHOULDER, SKEL_TORSO| Constructor and Description |
|---|
SimpleOpenNI(int deviceIndex,
processing.core.PApplet parent)
Creates the OpenNI context ands inits the modules
|
SimpleOpenNI(int deviceIndex,
processing.core.PApplet parent,
int runMode)
Creates the OpenNI context ands inits the modules
|
SimpleOpenNI(processing.core.PApplet parent)
Creates the OpenNI context ands inits the modules
|
SimpleOpenNI(processing.core.PApplet parent,
int runMode)
Creates the OpenNI context ands inits the modules
|
SimpleOpenNI(processing.core.PApplet parent,
java.lang.String recordPath)
Creates the OpenNI context ands inits the modules
|
SimpleOpenNI(processing.core.PApplet parent,
java.lang.String recordPath,
int runMode)
Creates the OpenNI context ands inits the modules
|
| Modifier and Type | Method and Description |
|---|---|
void |
calcUserCoordsys(processing.core.PMatrix3D mat)
Applies only the rotation part of 'mat' to
|
void |
calcUserCoordsys(processing.core.PVector point)
Calculates a point in the user defined coordinate system back to the 3d system of the 3d camera
|
void |
calcUserCoordsysBack(processing.core.PMatrix3D mat)
Calculates a point in origninal 3d camera coordinate system to the coordinate system defined by the user
|
void |
calcUserCoordsysBack(processing.core.PVector point)
Calculates a point in origninal 3d camera coordinate system to the coordinate system defined by the user
|
void |
convertProjectiveToRealWorld(processing.core.PVector proj,
processing.core.PVector world) |
void |
convertRealWorldToProjective(processing.core.PVector world,
processing.core.PVector proj) |
processing.core.PImage |
depthImage()
Enable the depthMap data collection
|
int[] |
depthMap() |
processing.core.PVector[] |
depthMapRealWorld() |
static int |
deviceCount() |
static int |
deviceNames(StrVector nodeNames) |
void |
dispose() |
void |
drawCamFrustum()
Helper method that draw the 3d camera and the frustum of the camera
|
void |
drawLimb(int userId,
int joint1,
int joint2)
Draws a limb from joint1 to joint2
|
boolean |
enableDepth()
Enable the depthMap data collection
|
boolean |
enableHand()
Enable hands
|
boolean |
enableHand(java.lang.Object cbObject)
Enable hands
|
boolean |
enableIR()
Enable the irMap data collection
ir is only available if there is no rgbImage activated at the same time
|
boolean |
enableIR(int width,
int height,
int fps)
Enable the irMap data collection
ir is only available if there is no irImage activated at the same time
|
boolean |
enableRecorder(java.lang.String filePath)
Enable recorder
|
boolean |
enableRGB()
Enable the camera image collection
|
boolean |
enableRGB(int width,
int height,
int fps)
Enable the camera image collection
|
boolean |
enableUser()
Enable user
|
boolean |
enableUser(java.lang.Object cbObject)
Enable user
|
void |
finalize() |
boolean |
getBoundingBox(int user,
processing.core.PVector bbMin,
processing.core.PVector bbMax) |
boolean |
getCoM(int user,
processing.core.PVector com) |
float |
getJointOrientationSkeleton(int userId,
int joint,
processing.core.PMatrix3D jointOrientation)
gets the orientation of a joint
|
float |
getJointPositionSkeleton(int userId,
int joint,
processing.core.PVector jointPos)
gets the coordinates of a joint
|
static java.lang.String |
getLibraryPathLinux() |
static java.lang.String |
getLibraryPathWin() |
static java.lang.reflect.Method |
getMethodRef(java.lang.Object obj,
java.lang.String methodName,
java.lang.Class[] paraList) |
void |
getUserCoordsys(processing.core.PMatrix3D mat) |
void |
getUserCoordsysBack(processing.core.PMatrix3D mat) |
void |
getUserCoordsysTransMat(processing.core.PMatrix3D xformMat)
gets the transformation matrix of a user defined coordinatesystem
|
int[] |
getUsers() |
processing.core.PImage |
irImage() |
static int |
raySphereIntersection(processing.core.PVector p,
processing.core.PVector dir,
processing.core.PVector sphereCenter,
float sphereRadius,
processing.core.PVector hit1,
processing.core.PVector hit2) |
static boolean |
rayTriangleIntersection(processing.core.PVector p,
processing.core.PVector dir,
processing.core.PVector vec0,
processing.core.PVector vec1,
processing.core.PVector vec2,
processing.core.PVector hit) |
processing.core.PImage |
rgbImage() |
static void |
start() |
int |
startTrackingHand(processing.core.PVector pos) |
void |
update()
Enable the user data collection
|
processing.core.PImage |
userImage() |
int[] |
userMap() |
addNodeToRecording, alternativeViewPointDepthToImage, calcUserCoordsys, calcUserCoordsysBack, calcUserCoordsysBackMat, calcUserCoordsysMat, chdir, close, convertProjectiveToRealWorld, convertProjectiveToRealWorld, convertRealWorldToProjective, convertRealWorldToProjective, curFramePlayer, delete, depthHeight, depthImage, depthImageColorMode, depthImageTimeStamp, depthMap, depthMapRealWorld, depthMapSize, depthMapTimeStamp, depthRealWorldTimeStamp, depthToColor, depthWidth, deviceIndex, enableDepth, endGesture, framesPlayer, getBoundingBox, getCoM, getcwd, getJointOrientationSkeleton, getJointPositionSkeleton, getNumberOfUsers, getSmoothingHand, getUserCoordsys, getUserCoordsysBack, getUserCoordsysTransMat, getUsers, handTimeStamp, hasUserCoordsys, hFieldOfView, imageTimeStamp, init, init, init, init, init, initContext, irHeight, irImage, irMap, irTimeStamp, irWidth, isEndPlayer, isInit, isPlaybackPlay, isTrackingSkeleton, mirror, nodes, openFileRecording, playbackPlay, playbackSpeedPlayer, raySphereIntersection, rayTriangleIntersection, repeatPlayer, resetUserCoordsys, rgbHeight, rgbImage, rgbWidth, sceneTimeStamp, seekPlayer, setDepthColorSyncEnabled, setDepthImageColor, setDepthImageColorMode, setDepthToColor, setMirror, setPlaybackSpeedPlayer, setRepeatPlayer, setSmoothingHand, setUserCoordsys, startGesture, startTrackingHand, startTrackingSkeleton, stopTrackingAllHand, stopTrackingHand, stopTrackingSkeleton, swigReleaseOwnership, swigTakeOwnership, updateAll, updateSubTimeStamp, updateTimeStamp, userHeight, userImage, userMap, userTimeStamp, userWidth, version, vFieldOfViewpublic SimpleOpenNI(int deviceIndex,
processing.core.PApplet parent)
deviceIndex - intparent - PAppletpublic SimpleOpenNI(int deviceIndex,
processing.core.PApplet parent,
int runMode)
deviceIndex - intparent - PAppletrunMode - - RUN_MODE_DEFAULT, RunMode_SingleThreaded = Runs all in a single thread
- RunMode_MultiThreaded = Runs the openNI/NIITE in another thread than processingpublic SimpleOpenNI(processing.core.PApplet parent)
parent - PAppletpublic SimpleOpenNI(processing.core.PApplet parent,
int runMode)
parent - PAppletrunMode - - RUN_MODE_DEFAULT, RunMode_SingleThreaded = Runs all in a single thread
- RunMode_MultiThreaded = Runs the openNI/NIITE in another thread than processingpublic SimpleOpenNI(processing.core.PApplet parent,
java.lang.String recordPath)
parent - PAppletrecordPath - String, path to the record filepublic SimpleOpenNI(processing.core.PApplet parent,
java.lang.String recordPath,
int runMode)
parent - PAppletrecordPath - String, path to the record filerunMode - - RUN_MODE_DEFAULT, RunMode_SingleThreaded = Runs all in a single thread
- RunMode_MultiThreaded = Runs the openNI/NIITE in another thread than processingpublic void calcUserCoordsys(processing.core.PMatrix3D mat)
mat - PMatrix3Dpublic void calcUserCoordsys(processing.core.PVector point)
point - PVectorpublic void calcUserCoordsysBack(processing.core.PMatrix3D mat)
mat - PMatrix3Dpublic void calcUserCoordsysBack(processing.core.PVector point)
point - PVectorpublic void convertProjectiveToRealWorld(processing.core.PVector proj,
processing.core.PVector world)
public void convertRealWorldToProjective(processing.core.PVector world,
processing.core.PVector proj)
public processing.core.PImage depthImage()
width - intheight - intfps - intpublic int[] depthMap()
public processing.core.PVector[] depthMapRealWorld()
public static int deviceCount()
public static int deviceNames(StrVector nodeNames)
public void dispose()
public void drawCamFrustum()
public void drawLimb(int userId,
int joint1,
int joint2)
userId - intjoint1 - intjoint2 - intpublic boolean enableDepth()
enableDepth in class ContextWrapperpublic boolean enableHand()
enableHand in class ContextWrapperpublic boolean enableHand(java.lang.Object cbObject)
public boolean enableIR()
enableIR in class ContextWrapperpublic boolean enableIR(int width,
int height,
int fps)
enableIR in class ContextWrapperwidth - intheight - intfps - intpublic boolean enableRecorder(java.lang.String filePath)
enableRecorder in class ContextWrapperpublic boolean enableRGB()
enableRGB in class ContextWrapperpublic boolean enableRGB(int width,
int height,
int fps)
enableRGB in class ContextWrapperwidth - intheight - intfps - intpublic boolean enableUser()
enableUser in class ContextWrapperpublic boolean enableUser(java.lang.Object cbObject)
public void finalize()
public boolean getBoundingBox(int user,
processing.core.PVector bbMin,
processing.core.PVector bbMax)
public boolean getCoM(int user,
processing.core.PVector com)
public float getJointOrientationSkeleton(int userId,
int joint,
processing.core.PMatrix3D jointOrientation)
userId - intjoint - intjointOrientation - PMatrix3Dpublic float getJointPositionSkeleton(int userId,
int joint,
processing.core.PVector jointPos)
userId - intjoint - intjointPos - PVectorpublic static java.lang.String getLibraryPathLinux()
public static java.lang.String getLibraryPathWin()
public static java.lang.reflect.Method getMethodRef(java.lang.Object obj,
java.lang.String methodName,
java.lang.Class[] paraList)
public void getUserCoordsys(processing.core.PMatrix3D mat)
public void getUserCoordsysBack(processing.core.PMatrix3D mat)
public void getUserCoordsysTransMat(processing.core.PMatrix3D xformMat)
xformMat - PMatrix3Dpublic int[] getUsers()
public processing.core.PImage irImage()
public static int raySphereIntersection(processing.core.PVector p,
processing.core.PVector dir,
processing.core.PVector sphereCenter,
float sphereRadius,
processing.core.PVector hit1,
processing.core.PVector hit2)
public static boolean rayTriangleIntersection(processing.core.PVector p,
processing.core.PVector dir,
processing.core.PVector vec0,
processing.core.PVector vec1,
processing.core.PVector vec2,
processing.core.PVector hit)
public processing.core.PImage rgbImage()
public static void start()
public int startTrackingHand(processing.core.PVector pos)
public void update()
update in class ContextWrapperpublic processing.core.PImage userImage()
public int[] userMap()